POV-Ray : Newsgroups : povray.newusers : max(0,min(1,x)) : Re: max(0,min(1,x)) Server Time
4 Sep 2024 18:13:23 EDT (-0400)
  Re: max(0,min(1,x))  
From: Marc-Hendrik Bremer
Date: 2 Oct 2002 08:53:56
Message: <3d9aec64@news.povray.org>
There is no shortcut afaik.
Just use

#declare limit1= function(a) {max(0,min(1,a))}

or somethink like that.

Feel free to add this to your "functions.inc" or some other include-file you
are using frequently. There is really no need to build in everythink in the
Pov-Code.

Hth,

Marc-Hendrik


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.